﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.ywxt.ProjectNew
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    public class map_ProjectNewSQ : EntityMapping<DB_Model.ywxt.ProjectNew.ProjectNewSQ>
    {
        public map_ProjectNewSQ()
        {
            Property(x => x.ProjectYear, map =>
            {
            });

            Property(x => x.ProjectName, map =>
            {
                map.Length(400);
            });

            Property(x => x.ProjectNBFL, map =>
            {
                map.Length(200);
            });

            Property(x => x.ProjectWBBH, map =>
            {
                map.Length(200);
            });

            Property(x => x.ProjectXMXZ, map =>
            {
                map.Length(200);
            });

            Property(x => x.ProjectZBFS, map =>
            {
                map.Length(200);
            });

            Property(x => x.ProjectZBNR, map =>
            {
                map.Length(1000000);
            });

            Property(x => x.ProjectZJLY, map =>
            {
                map.Length(200);
            });

            Property(x => x.ProjectBH, map =>
            {
                map.Length(20);
            });

            Property(x => x.ProjectBH_PREV, map =>
            {
                map.Length(20);
            });

            Property(x => x.ProjectBDWMC, map =>
            {
                map.Length(100000);
            });

            Property(x => x.sqContent, map =>
            {
                map.Length(100000);
            });

            Property(x => x.sqResult, map =>
            {
                map.Length(100000);
            });

            Property(x => x.ApprovalRecordId, map =>
            {
                map.Length(40);
            });

            //申请用户
            ManyToOne(x => x.sqUser, map =>
            {
                map.Column("UserID");
            });

            //项目业主
            ManyToOne(x => x.ProjectOwner, map =>
            {
                map.Column("EntID");
            });
        }
    }
}
